package edu.sctu.nieyu.day20150506.studentmessage;

/**
 * Created by user01 on 2015/5/6.
 */
public class Mainprint  {
    public static void main(String[] args) {
        Interface interf ;
        StudentOne studentOne = new StudentOne();
        studentOne.setName();
        studentOne.setCard();
        studentOne.setSex();
        studentOne.getInfo(new Interface() {
            @Override
            public void setInfomation(String name, int card, String sex) {
                System.out.println("姓名："+name+"\n"+"学号："+card+"\n"+"性别："+sex);
            }
        });
        StudentTwo studentTwo = new StudentTwo();
        studentTwo.setName();
        studentTwo.setCard();
        studentTwo.setSex();
        studentTwo.getInfo(new Interface() {
            @Override
            public void setInfomation(String name, int card, String sex) {
                System.out.println("姓名："+name+"\n"+"学号："+card+"\n"+"性别："+sex);
            }
        });
        StudentThree studentThree = new StudentThree();
        studentThree.setName();
        studentThree.setCard();
        studentThree.setSex();
        studentThree.getInfo(new Interface() {
            @Override
            public void setInfomation(String name, int card, String sex) {
                System.out.println("姓名："+name+"\n"+"学号："+card+"\n"+"性别："+sex);
            }
        });
    }



}
